<!doctype html>
<script src="../../../resources/testharness.js"></script>
<script src="../../../resources/testharnessreport.js"></script>
<script src="../../assert_selection.js"></script>
<script>

selection_test(
  '<div contenteditable dir="ltr">|\u0661\u0662\u0663\u0627\u0628\u0629</div>',
  selection => selection.modify('move', 'right', 'character'),
  '<div contenteditable dir="ltr">\u0661|\u0662\u0663\u0627\u0628\u0629</div>',
  '9-0 ltr right character');

selection_test(
  '<div contenteditable dir="ltr">\u0661|\u0662\u0663\u0627\u0628\u0629</div>',
  selection => selection.modify('move', 'right', 'character'),
  '<div contenteditable dir="ltr">\u0661\u0662|\u0663\u0627\u0628\u0629</div>',
  '9-1 ltr right character');

selection_test(
  '<div contenteditable dir="ltr">\u0661\u0662|\u0663\u0627\u0628\u0629</div>',
  selection => selection.modify('move', 'right', 'character'),
  '<div contenteditable dir="ltr">\u0661\u0662\u0663|\u0627\u0628\u0629</div>',
  '9-2 ltr right character');

selection_test(
  '<div contenteditable dir="ltr">\u0661\u0662\u0663|\u0627\u0628\u0629</div>',
  selection => selection.modify('move', 'right', 'character'),
  '<div contenteditable dir="ltr">\u0661\u0662\u0663\u0627|\u0628\u0629</div>',
  '9-3 ltr right character');

selection_test(
  '<div contenteditable dir="ltr">\u0661\u0662\u0663\u0627|\u0628\u0629</div>',
  selection => selection.modify('move', 'right', 'character'),
  '<div contenteditable dir="ltr">\u0661\u0662\u0663\u0627\u0628|\u0629</div>',
  '9-4 ltr right character');

selection_test(
  '<div contenteditable dir="ltr">\u0661\u0662\u0663\u0627\u0628|\u0629</div>',
  selection => selection.modify('move', 'right', 'character'),
  '<div contenteditable dir="ltr">\u0661\u0662\u0663\u0627\u0628\u0629|</div>',
  '9-5 ltr right character');

selection_test(
  '<div contenteditable dir="ltr">\u0661\u0662\u0663\u0627\u0628\u0629|</div>',
  selection => selection.modify('move', 'right', 'character'),
  '<div contenteditable dir="ltr">\u0661\u0662\u0663\u0627\u0628\u0629|</div>',
  '9-6 ltr right character');
</script>
